<extend name="Index/index" />
<block name="nav1">
	<ul class="breadcrumb">
		<li>
			<i class="icon-home home-icon"></i>
			<a href="#">Admin</a>
		</li>
		<li class="active">商品信息管理</li>
	</ul><!-- .breadcrumb -->
</block>

<block name="nav2">
		<h1>
			商品信息管理
		</h1>
</block>
<block name="main">
    
	<table class="table table-hover mt20">
		<tr>
		    <td>图片封面</td>
			<td>商品ID</td>
			<td>分类ID</td>
			<td>商品名</td>
			<td>商品价格</td>
			<td>库存</td>
			<td>点击量</td>
			<td>销量</td>
			<td>上架</td>
			<td>热销</td>
			<td>描述</td>
			<td>上架时间</td>
			<td>操作</td>
		</tr>
		<foreach name="list" item="v">
		<tr>
		    <td><img src="__UPLOAD__/<{$v.icon}>"></td>
			<td><{$v.id}></td>
			<td><{$v.cid}></td>
			<td><textarea><{$v.gname}></textarea></td>
			<td><{$v.price}></td>
			<td><{$v.stock}></td>
			<td><{$v.cknum}></td>
			<td><{$v.sales}></td>
			<td>
				<if condition="$v.up eq '1'">
				    <a href="<{:U('up',array('id'=>$v['id'],'s'=>2))}>">显示</a>
				<else/>
				    <a href="<{:U('up',array('id'=>$v['id'],'s'=>1))}>">隐藏</a>
				</if>
			</td>
			<td>
				<if condition="$v.hot eq '1'">
				    <a href="<{:U('hot',array('id'=>$v['id'],'s'=>2))}>">热销</a>
				<else/>
				    <a href="<{:U('hot',array('id'=>$v['id'],'s'=>1))}>">不热销</a>
				</if>
			</td>
			<td><textarea><{$v.des}></textarea></td>
			<td><{:date('Y-m-d H:i:s',$v['uptime'])}></td>
			<td><a href="<{:U('img',array('id'=>$v['id']))}>" class="btn btn-primary">图片管理</a></td>   
			<td class="col-md-2">
				<a href="<{:U('edit',array('id'=>$v['id']))}>" class="btn btn-primary">编辑</a>
				<a href="<{:U('del',array('id'=>$v['id']))}>" class="btn btn-danger">删除</a>
			</td>
		</tr>
		</foreach>
	</table>
	<div class="pages"><{$page}></div>

	</block>
